import {EntityId, PageQueryParams} from "kf-web-library";
import {Journal, User} from "@/services";

export interface PayOrderPageQueryParams extends Partial<PageQueryParams> {
  searchText?: string;
  ids?: EntityId[];
}

export interface PayOrder{
  deleted: number; //删除标记
  id: number; //主键
  orderNo: string; //订单编号
  userId: number; //用户ID
  user: User; //用户ID
  timeType: string; //
  displayType: string; //
  journalId: string; //期刊ID
  journal: Journal; //期刊ID
  planId: number; //订阅套餐ID
  planName: string; //套餐名称
  periodCount: number; //包含期数
  totalPrice: number; //套餐总价
  originalAmount: number; //原始金额
  discountAmount: number; //折扣金额
  actualAmount: number; //实际支付金额
  discountRate: number; //折扣率
  status: string; //状态(待支付,已支付,已取消,已过期)    PayOrderStatus
  paymentMethod: string; //支付方式(支付宝,微信,银行卡) PaymentMethod
  paymentTime: string; //支付时间
  paymentTransactionId: string; //收钱吧交易流水号
  createTime: string; //创建时间
  createUserId: number; //${column.comment}
  modifyTime: string; //修改时间
  modifyUserId: number; //${column.comment}
}


export interface PayOrder_Create{
  orderNo: string; //订单编号
  userId: number; //用户ID
  journalId: string; //期刊ID
  planId: number; //订阅套餐ID
  planName: string; //套餐名称
  periodCount: number; //包含期数
  totalPrice: number; //套餐总价
  originalAmount: number; //原始金额
  discountAmount: number; //折扣金额
  actualAmount: number; //实际支付金额
  discountRate: number; //折扣率
  status: string; //状态(待支付,已支付,已取消,已过期)    PayOrderStatus
  paymentMethod: string; //支付方式(支付宝,微信,银行卡) PaymentMethod
  paymentTime: string; //支付时间
  paymentTransactionId: string; //收钱吧交易流水号
}




export interface PayOrder_Modify extends PayOrder_Create {
  id: EntityId;
}

export interface PayOrder_Patch extends Partial<PayOrder_Modify> {
  id: EntityId;
}

